package com.itheima.Homework5;

import java.util.Scanner;

public class Test05 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //输入3个变量
        System.out.print("请输入第一个整数: ");
        int a = sc.nextInt();
        System.out.print("请输入第二个整数: ");
        int b = sc.nextInt();
        System.out.print("请输入第三个整数: ");
        int c = sc.nextInt();
        print(a, b, c);
    }
    // 功能 从小到大打印          --print
    //条件 三个整数                --int a,int b,intc
    public static void print(int a, int b, int c) {
        int tmpmax = a > b ? a : b;
        int max = tmpmax > c ? tmpmax : c;
        int tmpmin = a < b ? a : b;
        int min = tmpmin < c ? tmpmin : c;
        int mid = a + b + c - max - min;
        System.out.println("从大到小的顺序是:" + max + " " + mid + " " + min);
    }
}
